import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:frontend/pages/loginPage.dart';
import 'package:frontend/pages/registerPage.dart';

class RegOrLogPage extends StatelessWidget {
  const RegOrLogPage({super.key});

  @override
  Widget build(BuildContext context) {
    return DefaultTabController(
      length: 2,
      child: Scaffold(
        appBar: AppBar(
          title: const Text("注册/登录"),
          bottom: const TabBar(
            tabs: [Tab(text: "登录",),Tab(text: "注册"), ],
          ),
        ),
        body: const TabBarView(
          //构建
          children: [
            LoginPage(),
            RegisterPage(),
          ]
        ),
      ),
    );
  }
}
